/*******************************************************************************
*funtion: 
*date	:	
*author	:
*modify	:
*note	:
*******************************************************************************/
#define WIN32_LEAN_AND_MEAN

#include "DevicePlugin.h"
#include "FileRecord.h"
#include "Poco/Thread.h"

#include <string>
using namespace std;

class FileReader:public Runnable
{
public:
	FileReader(DevicePlugin* pPlugin):m_pPlugin(pPlugin),m_bExit(false){}
	void exit();
protected:
	void run();
private:
	DevicePlugin* m_pPlugin;
	FileRecord	 m_fr;
	bool m_bExit;
};
class  FilePlugin : public DevicePlugin
{
public:
    FilePlugin();
    ~FilePlugin();

public:
    virtual int init();
    virtual int fini();
    virtual int login(string& id,string& ip,unsigned short port,string& user,string& pass);
    virtual int logout();
	virtual long openLive(long userID,long channel);
    virtual long closeLive(long streamID);
//	std::string getCompany() const;

private:
	Thread m_td;
	FileReader* m_pFR;
};
